<?php
/**
 * Description of ValidateEntityVarchar
 *
 * @author Damiano Ciarla
 */
class ValidateEntityVarchar implements Validate
{
    public function validate($field, $value, $condition = null)
	{
		if(!is_null($value) && strlen($value) > 0)
			if(strlen($value) > 65535 || !is_string($value))
				return TD_("Il campo", "validator") . " <b><u>" . ucfirst($field) . "</u></b> " . TD_("deve avere una lunghezza pari o inferiore a 65535", "validator");
		
		return true;
	}
}
?>
